//
//  PeopleCenter.m
//  HMSupplier
//
//  Created by haohao on 2017/7/11.
//  Copyright © 2017年 haohao. All rights reserved.
//

#import "PeopleCenter.h"
#import "RecordTetailModel.h"

@implementation PeopleCenter

+ (void)searchWith:(NSString *)result time:(NSString *)time success:(searchSuccessBlock)success failure:(searchFailuerBlock)failure {
    [HttpBaseTool requestWithBaseUrl:kBaseUrl path:kFilterSelectUrl method:GET_REQUEST isJSON:YES params:@{@"uid":[MGAccountTool getUid], @"time":time ,@"name":result} ssuccess:^(id responseObj) {
        NSArray *dataArray = [RecordTetailModel mj_objectArrayWithKeyValuesArray:responseObj[@"data"]];
        success(dataArray);
    } failure:^(NSError *error) {
        failure(error);
    }];
}

//账单明细
+ (void)getBillDetailWith:(BileModel *)model success:(searchSuccessBlock)success failure:(searchFailuerBlock)failure {
    [HttpBaseTool requestWithBaseUrl:kBaseUrl path:kRecordTetail method:GET_REQUEST isJSON:YES params:@{@"uid":[MGAccountTool getUid], @"time":model.addtimefix} ssuccess:^(id responseObj) {
        NSArray *dataArray = [RecordTetailModel mj_objectArrayWithKeyValuesArray:responseObj[@"data"]];
        success(dataArray);
    } failure:^(NSError *error) {
        failure(error);
    }];
}

@end
